/*
 * @Author: lilin_:）
 * @version: 1.0
 * @Descripttion:获取发票台账数据
 * @Date: 2021-07-03 10:55:46
 * @LastEditors: sueRimn
 * @LastEditTime: 2021-09-06 13:54:08
 */
import request from '/@/utils/request';


/**
 * 获取发票台账复制
 * @params params 要传的参数值
 * @returns 返回接口数据
 */
export let axios_selOne = (params: object) => {
	return request({
		url: 'bill/selOne',
		method: 'get',
		params: params,
	});
};

/**
 * 获取发票台账
 * @data data 要传的参数值
 * @returns 返回接口数据
 */
export let axios_getInvoiceLedgerTableData = (data: object) => {
	return request({
		url: 'bill/selList',
		method: 'post',
		params: data,
	});
};



/**
 * @Author: lilin_:）
 * @name: // 查询项目名称通过id查询
 * @Descripttion: 
 * @param {object} params
 * @return {*}
 */
export let axios_selListByContractUnitId = (params: object) => {
	return request({
		url: '/contract/selListByContractUnitId',
		method: 'get',
		params: params,
	});
};


/**
 * @Author: lilin_:）
 * @name: 查询基础变量
 * @Descripttion: 
 * @param {*}
 * @return {*}
 */
export let axios_BasicsVar = () => {
	return request({
		url: '/item/selOne',
		method: 'get',
	});
};


/**
 * @Author: lilin_:）
 * @name: 修改基础变量
 * @Descripttion: 
 * @param {any} params
 * @return {*}
 */
export let axios_amendBasicsVar = (params: any) => {
	return request({
		url: '/item/up',
		method: 'post',
		data: params,
	});
};




/**
 * @Author: lilin_:）
 * @name: 批量删除发票台账
 * @Descripttion: 
 * @param {any} data
 * @return {*}
 */
export let axios_billDell = (data: any) => {
	return request({
		url: '/bill/del',
		method: 'post',
		data: data,
	});
};


/**
 * @Author: lilin_:）
 * @name: 添加发票台账
 * @Descripttion: 
 * @param {any} data
 * @return {*}
 */
export let axios_billAdd = (data: any) => {
	return request({
		url: '/bill/add',
		method: 'post',
		data: data,
	});
};







/**
 * @Author: lilin_:）
 * @name: 查询项目名称
 * @Descripttion: 
 * @param {object} params
 * @return {*}
 */
export let axios_selListByContractUnit = () => {
	return request({
		url: '/contract/selListTop',
		method: 'get',
	});
};





export let axios_getInvoiceLedgerTabl1 = (data: object) => {
	return request({
		url: '/contacts/selList',
		method: 'get',
		data: data,
	});
};







//获取发票类型列表

export let axios_invoiceselList = () => {
	return request({
		url: '/invoice/selList',
		method: 'get',
	});
};


// 发票类型删除
export let axios_invoicedel = (data: any) => {
	return request({
		url: '/invoice/del',
		method: 'post',
		data
	});
};


// 发票类型编辑
export let axios_invoiup = (data: any) => {
	return request({
		url: '/invoice/up',
		method: 'post',
		data
	});
};


// 发票类型编辑
export let axios_invoiadd = (data: any) => {
	return request({
		url: '/invoice/add',
		method: 'post',
		data
	});
};


// 修改发票台账
export let axios_billup = (data: any) => {
	return request({
		url: '/bill/up',
		method: 'post',
		data
	});
};

// 新增发票台账
export let axios_billadd = (data: any) => {
	return request({
		url: '/bill/add',
		method: 'post',
		data
	});
};

// 通过单位名称查询id

// 输入产量值计算进度


export function axios_selValue_count(params: object) {
	return request({
		url: '/bill/selValue_count',
		method: 'get',
		params: params,
	});
}



// 计算城建税 教育费附加 地方教育费附加 小计 企业所得税
export function axios_selValue_prepaidVat(params: object) {
	return request({
		url: '/bill/selValue_prepaidVat',
		method: 'get',
		params: params,
	});
}


// 计算单价 单价=开票金额/(1+税率)
export function axios_selValue_selValue_unitPrice(params: object) {
	return request({
		url: '/bill/selValue_unitPrice',
		method: 'get',
		params: params,
	});
}



// 计算增值税额
export function axios_selValue_calculate(params: object) {
	return request({
		url: '/calculate/sub',
		method: 'get',
		params: params,
	});
}




//发票台账新增
export function axios_billselCodeNum() {
	return request({
		url: '/bill/selCodeNum',
		method: 'get',
	});
}




/**
 * 用户退出登录
 * @param params 要传的参数值
 * @returns 返回接口数据
 */
export function signOut(params: object) {
	return request({
		url: '/user/signOut',
		method: 'post',
		data: params,
	});
}
